using Headsight.BPMN2WF.BPMN.Schemas;
using Headsight.BPMN2WF.Testing.TestObjCtors;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Headsight.BPMN2WF.BPMN.Model
{
    [TestClass]
    public class BPMNElementVisualTest : BPMNBaseElementTestFixture<BPMNElementVisual, BPMNShape>
    {
        protected override BPMNElementVisual CreateSut(BPMNShape bpmnShape, string expectedId)
        {
            bpmnShape.id = expectedId;

            return new BPMNElementVisual(bpmnShape);
        }

        [TestMethod]
        public override void Id()
        {
            Assert.AreEqual("**id**", _sut.Id);
        }
        
        [TestMethod]
        public void Bounds()
        {
            var bpmnShape = new BPMNShapeCtor().Create();
            _sut = new BPMNElementVisual(bpmnShape);

            var actual = _sut.Bounds;

            Assert.AreEqual(bpmnShape.Bounds.x, actual.X);
            Assert.AreEqual(bpmnShape.Bounds.y, actual.Y);
            Assert.AreEqual(bpmnShape.Bounds.width, actual.Width);
            Assert.AreEqual(bpmnShape.Bounds.height, actual.Height);
        }
    }
}